package com.java.demo7;

public class Demo {
    public static void main(String[] args) {
        // 1.new 动物操作类
        AnimalOperate animalOperate = new AnimalOperate();
        // 2.调用猫类中的eat方法
//        animalOperate.userCat(new Cat());
        // 2.调用狗类中的eat方法
//        animalOperate.userDog(new Dog());

//        animalOperate.userAnimal();
        animalOperate.userAnimal(new Dog());
        animalOperate.userAnimal(new Cat());
    }
}
